package com.craney.aboutFilter
{
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.filters.BitmapFilterQuality;
	import flash.filters.GradientBevelFilter;
	
	public class TestGradientBevelFilter
	{
		public function TestGradientBevelFilter(ps:Sprite)
		{
			var box:Shape = new Shape();
			box.graphics.lineStyle();
			box.graphics.beginFill(0xFEFE78);
//			box.graphics.beginFill(0xffccee);
			box.graphics.drawRect(100, 50, 90, 200);
			box.graphics.endFill();
			
			// Apply a gradient bevel to the rectangle.
			var gradientBevel:GradientBevelFilter = new GradientBevelFilter();
			
			gradientBevel.distance = 8;
			gradientBevel.angle = 225; // opposite of 45 degrees
			gradientBevel.colors = [0xFFFFCC, 0xFEFE78, 0x8F8E01];
			gradientBevel.alphas = [1, 0, 1];
			gradientBevel.ratios = [0, 128, 255];
			gradientBevel.blurX = 8;
			gradientBevel.blurY = 8;
			gradientBevel.quality = BitmapFilterQuality.HIGH;
			
			// Other properties let you set the filter strength and set options
			// for inner bevel and knockout effects.
			
			box.filters = [gradientBevel];
			
			// Add the graphic to the display list.
			ps.addChild(box);

		}

	}
}